<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<link href="__ADMIN__theme/js/rateit/rateit.css" rel="stylesheet" type="text/css" />

<script src="__ADMIN__theme/js/rateit/jquery.rateit.min.js" type="text/javascript"></script>
<div class="bjui-pageContent" >
        <div data-layout-h="0">
                <!-- 内容区 -->
                <form action="{:U('Sales/comment_add')}" class="pageForm nice-validator n-red" data-loadingmask='false' data-toggle="validate" novalidate="novalidate" data-reload-navtab="true" method="post" >
                        <input type="hidden" name="id" value="{$_GET.id|default=''}" />
                        <table class="table table-condensed table-hover">
                                <tr>
                                        <th><label style='margin-left:40px;'>线路id:</label></th>
                                        <td>
                                                <input type="text" data-rule="required" name="tours_id"  value="{$tours_comment.tours_id|default=''}" />
                                        </td>


                                </tr>
                                <tr>
                                        <th><label style='margin-left:40px;'>行程:</label></th>
                                        <td>
                                                <input type="hidden" data-rule="required" name="xingcheng" value="{$tours_comment.xingcheng|default=0}"/>
                                                <div class="rateit" id="xingcheng" data-rule="required" data-rateit-step="1" data-rateit-max="5"> </div> <span id="xingcheng_val"></span> 
                                        </td>


                                </tr>
                                <tr>
                                        <th><label style='margin-left:40px;'>交通:</label></th>
                                        <td>
                                                <input type="hidden" data-rule="required" name="jiaotong" value="{$tours_comment.jiaotong|default=0}"/>
                                                <div class="rateit" data-rule="required" id="jiaotong" data-rateit-step="1" data-rateit-max="5"> </div> <span id="jiaotong_val"></span> 
                                        </td>
                                </tr>
                                <tr>
                                        <th><label style='margin-left:40px;'>导游:</label></th>
                                        <td>
                                                <input type="hidden" data-rule="required" name="daoyou" value="{$tours_comment.daoyou|default=0}"/>
                                                <div class="rateit" data-rule="required" id="daoyou" data-rateit-step="1" data-rateit-max="5"> </div> <span id="daoyou_val"></span> 
                                        </td>
                                </tr>
                                <tr>
                                        <th><label style='margin-left:40px;'>住宿:</label></th>
                                        <td>
                                                <input type="hidden" data-rule="required" name="zhusu" value="{$tours_comment.zhusu|default=0}"/>
                                                <div class="rateit" data-rule="required" id="zhusu" data-rateit-step="1" data-rateit-max="5"> </div> <span id="zhusu_val"></span> 
                                        </td>
                                </tr>
                                <tr>
                                        <th><label style='margin-left:40px;'>用餐:</label></th>
                                        <td>
                                                <input type="hidden" data-rule="required" name="yongcan" value="{$tours_comment.yongcan|default=0}"/>
                                                <div class="rateit" data-rule="required" id="yongcan" data-rateit-step="1" data-rateit-max="5"> </div> <span id="yongcan_val"></span> 
                                        </td>
                                </tr>
                                <tr>
                                        <th><label style='margin-left:40px;'>客服:</label></th>
                                        <td>
                                                <input type="hidden" data-rule="required" name="kefu" value="{$tours_comment.kefu|default=0}"/>
                                                <div class="rateit" data-rule="required" id="kefu" data-rateit-step="1" data-rateit-max="5"> </div> <span id="kefu_val"></span> 
                                        </td>
                                </tr>
                                <tr>
                                        <th><label style='margin-left:40px;'>点评内容:</label></th>
                                        <td>
                                                <textarea  name="content" rows="5" cols="30" data-rule="required">{$tours_comment.content|default=''}</textarea>
                                        </td>
                                </tr>
                                <tr>
                                        <th><label style='margin-left:40px;'>归来时间:</label></th>
                                        <td>
                                                <input data-toggle="datepicker" type="text" name="back_date" data-rule='required' value="{$tours_comment.back_date|default=''}" />
                                        </td>
                                </tr>
                                <tr>
                                        <th><label style='margin-left:40px;'>出游人数:</label></th>
                                        <td>
                                                <input name='chengren' value='{$tours_comment.chengren|default=1}' data-rule='required' size="8" />成人 -  
                                                <input name='ertong' value='{$tours_comment.ertong|default=0}' data-rule='required' size="8" />儿童
                                        </td>
                                </tr>
                                <tr>
                                        <th><label style='margin-left:40px;'>用户姓名:</label></th>
                                        <td>
                                               <input name="user_name" value="{$tours_comment.user_name|default=''}" size="10" data-rule='required' />
                                        </td>
                                </tr>
                                <tr>
                                        <th><label style='margin-left:40px;'>审核:</label></th>
                                        <td>
                                                <select data-toggle="selectpicker" data-rule='required' name="status" >
                                                        <option value="">选择类型</option>                                                        
                                                        <option value="0" {eq name="tours_comment.status" value="0"} selected{/eq}>未审核</option>
                                                        <option value="1" {eq name="tours_comment.status" value="1"} selected{/eq}>已审核</option>
                                                </select>  
                                        </td>
                                </tr>
                                <tr>
                                        <th><label style='margin-left:40px;'>点评方式:</label></th>
                                        <td>
                                                <select data-toggle="selectpicker" data-rule='required' name="type" >
                                                        <option value="">选择类型</option>                                                        
                                                        <option value="1" {eq name="tours_comment.type" value="1"} selected{/eq}>在线点评</option>
                                                        <option value="2" {eq name="tours_comment.type" value="2"} selected{/eq}>短信点评</option>
                                                        <option value="3" {eq name="tours_comment.type" value="3"} selected{/eq}>电话回访</option>
                                                </select>  
                                        </td>
                                </tr>
                        </table>
                </form>
        </div>

</div>
<div class="bjui-pageFooter" border='none'>
        <ul>
                <li><button type="button" class="btn btn-close">关闭</button></li>
                <li><button type="submit" class="btn btn-default">提交</button></li>
        </ul>
</div>
<script type="text/javascript">
        $(function() {
                var tooltipvalues = ['不满意1分', '一般2分', '不错3分', '满意4分', '非常满意5分'];
                $('.rateit').each(function(index, domEle) {
                        var rate_id = $(this).attr('id');
                        var rate = $("input[name='" + rate_id + "']").val();

                        $(this).rateit({max: 10});
                        if (parseInt(rate) == 0) {
                                rate = 0;
                        }
                        $(this).rateit('value', rate);

                        $(this).bind('over', function(event, value) {
                                if (value > 0) {
                                        $(this).attr('title', tooltipvalues[value - 1]);
                                }
                        });

                        $(this).bind('click', function(obj) {
                                var value = $(this).rateit('value');
                                var id = $(this).attr('id');
                                var html = '';
                                if (value > 0) {
                                        html = tooltipvalues[value - 1];
                                }
                                if (value > 0 && value < 2) {
                                        value = 0;
                                }
                                $("#" + id + "_val").html(html);
                                $("input[name='" + id + "']").val(value);
                        });


                });
        });


</script>